package com.ruoyi.system.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ruoyi.common.support.Convert;
import com.ruoyi.system.domain.HatchetCardBin;
import com.ruoyi.system.mapper.HatchetCardBinMapper;
import com.ruoyi.system.service.IHatchetCardBinService;

/**
 * 银行卡bin 服务层实现
 * 
 * @author xj
 * @date 2019-02-25
 */
@Service
public class HatchetCardBinServiceImpl implements IHatchetCardBinService 
{
	@Autowired
	private HatchetCardBinMapper hatchetCardBinMapper;

	/**
     * 查询银行卡bin信息
     * 
     * @param iD 银行卡binID
     * @return 银行卡bin信息
     */
    @Override
	public HatchetCardBin selectHatchetCardBinById(String iD)
	{
	    return hatchetCardBinMapper.selectHatchetCardBinById(iD);
	}
	
	/**
     * 查询银行卡bin列表
     * 
     * @param hatchetCardBin 银行卡bin信息
     * @return 银行卡bin集合
     */
	@Override
	public List<HatchetCardBin> selectHatchetCardBinList(HatchetCardBin hatchetCardBin)
	{
	    return hatchetCardBinMapper.selectHatchetCardBinList(hatchetCardBin);
	}
	
    /**
     * 新增银行卡bin
     * 
     * @param hatchetCardBin 银行卡bin信息
     * @return 结果
     */
	@Override
	public int insertHatchetCardBin(HatchetCardBin hatchetCardBin)
	{
	    return hatchetCardBinMapper.insertHatchetCardBin(hatchetCardBin);
	}
	
	/**
     * 修改银行卡bin
     * 
     * @param hatchetCardBin 银行卡bin信息
     * @return 结果
     */
	@Override
	public int updateHatchetCardBin(HatchetCardBin hatchetCardBin)
	{
	    return hatchetCardBinMapper.updateHatchetCardBin(hatchetCardBin);
	}

	/**
     * 删除银行卡bin对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteHatchetCardBinByIds(String ids)
	{
		return hatchetCardBinMapper.deleteHatchetCardBinByIds(Convert.toStrArray(ids));
	}

	/**
	 * 通过银行卡号和长度查询银行卡信息
	 */
	public List<HatchetCardBin> selectCardBinList(HatchetCardBin cardBin) {
		return hatchetCardBinMapper.selectCardBinList(cardBin);
	}
	
}
